{% extends "master.html" %}
{% block subtitle %} - 零售管理{% endblock %}

{% block main %}
<div class="container">
    <div class="row">
        <ol class="breadcrumb">
          <li><a href="{{url_for('bpRoot.view')}}">主面板</a></li>
          <li class="active">零售管理</li>
        </ol>
    </div>
    
    <div class="row">
        {{mymacros.render_search_form(form,3)}}
    </div>
    <div class="row">
        <div class="btn-toolbar pull-right">
            <div class="btn-group"><button type="button" class="btn btn-default" onclick="$('form').submit()">查询</button></div>
            <div class="btn-group"><a href="{{url_for('bpSale.view',action='add')}}" class="btn btn-primary">创建销售单</a></div>
        </div>
    </div>
    
    <div class="row">
        <table class="table table-bordered">
            <thead>
                <tr>
                    <td>系统编号</td>
                    <td>金额</td>
                    <td>状态</td>
                    <td>经手人</td>
                    <td>销售日期</td>
                </tr>
            </thead>
            <tbody>
                {% for r in result %}
                    <tr>
                        <td><a href="{{url_for('.view',action='view',id=r.id)}}">{{r.no}}</a></td>
                        <td>{{r.realAmount}}</td>
                        <td>{{r.status|ss(c='PO')}}</td>
                        <td>{{r.createBy}}</td>
                        <td>{{r.soldTime|ft}}</td>
                    </tr>
                {% endfor %}
            </tbody>
        </table>
    </div>
        
    
</div>
{% endblock %}